<template>
  <div>
    <h1>B组件</h1>
    {{s}}
  </div>
</template>

<script setup>
import {ref, reactive,onBeforeMount} from "vue"
import  emitter from '../plugins/Bus.ts'
let s=ref('')
onBeforeMount(()=>{
  console.log('onBeforeMount');
  emitter.on('fn',data=>{
    console.log('onBeforeMount emitter.on'+data);
    s.value=data
  })
})
</script>

<style scoped>

</style>